<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="140px">
      <el-form-item label="线路编号" prop="routeNo">
        <el-input v-model="queryParams.routeNo" placeholder="请输入线路编号" clearable @keyup.enter="handleQuery" />
      </el-form-item>
      <el-form-item label="线路名称" prop="name">
        <el-input v-model="queryParams.name" placeholder="请输入线路名称" clearable @keyup.enter="handleQuery" />
      </el-form-item>
      <el-form-item label="业务员是否强制授权" prop="isAuthOper">
        <el-select v-model="queryParams.isAuthOper" placeholder="请选择业务员是否强制授权" clearable>
          <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label" :value="dict.value" />
        </el-select>
      </el-form-item>
      <el-form-item label="司机是否强制授权" prop="isAuthDriver">
        <el-select v-model="queryParams.isAuthDriver" placeholder="请选择司机是否强制授权" clearable>
          <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label" :value="dict.value" />
        </el-select>
      </el-form-item>
      <el-form-item label="车辆是否强制授权" prop="isAuthVehicle">
        <el-select v-model="queryParams.isAuthVehicle" placeholder="请选择车辆是否强制授权" clearable>
          <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label" :value="dict.value" />
        </el-select>
      </el-form-item>
      <el-form-item label="星期几" prop="fixDay">
        <el-select v-model="queryParams.fixDay" placeholder="请选择星期几" clearable>
          <el-option v-for="dict in rest_time" :key="dict.value" :label="dict.label" :value="dict.value" />
        </el-select>
      </el-form-item>
      <el-form-item label="班次" prop="shift">
        <el-select v-model="queryParams.shift" placeholder="请选择班次" clearable>
          <el-option v-for="dict in execution_shift_1" :key="dict.value" :label="dict.label" :value="dict.value" />
        </el-select>
      </el-form-item>
      <el-form-item label="固定线路状态" prop="status">
        <el-input v-model="queryParams.status" placeholder="请输入固定线路状态" clearable @keyup.enter="handleQuery" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="primary" plain icon="Plus" @click="handleAdd"
          v-hasPermi="['service:fixZswsRoute:add']">新建固定线路</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
          v-hasPermi="['service:fixZswsRoute:edit']">修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="Edit" @click="handleAddTask"
          v-hasPermi="['service:fixZswsRoute:addTask']">追加任务</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="Minus" @click="handleCancelTask"
          v-hasPermi="['service:fixZswsRoute:addTask']">取消任务</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="Minus" @click="handleCancelTask"
          v-hasPermi="['service:fixZswsRoute:addTask']">已取消任务</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="Download" @click="handleExport"
          v-hasPermi="['service:fixZswsRoute:export']">导出线路信息</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="upload" @click="handleExport"
          v-hasPermi="['service:fixZswsRoute:export']">导入线路绩效</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="Download" @click="handleExport"
          v-hasPermi="['service:fixZswsRoute:export']">下载导入线路绩效模板</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="Download" @click="handleExport"
          v-hasPermi="['service:fixZswsRoute:export']">生成线路</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="Download" @click="handleExport"
          v-hasPermi="['service:fixZswsRoute:export']">地图生成线路</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="Download" @click="handleExport"
          v-hasPermi="['service:fixZswsRoute:export']">导出固定线路模板</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="Download" @click="handleExport"
          v-hasPermi="['service:fixZswsRoute:export']">设置强制授权人员</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
          v-hasPermi="['service:fixZswsRoute:remove']">删除</el-button>
      </el-col>
    </el-row>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="warning" plain icon="Download" @click="handleExport"
          v-hasPermi="['service:fixZswsRoute:export']">导出网点信息</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="Download" @click="handleExport"
          v-hasPermi="['service:fixZswsRoute:export']">网点查询线路</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="Download" @click="handleExport"
          v-hasPermi="['service:fixZswsRoute:export']">导出线路详情</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="Download" @click="handleExport"
          v-hasPermi="['service:fixZswsRoute:export']">已停用固定线路</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="Setting" @click="handleExport"
          v-hasPermi="['service:fixZswsRoute:export']">设置时长区分</el-button>
      </el-col>
      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="fixZswsRouteList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="线路编号" align="center" prop="routeNo" />
      <el-table-column label="线路名称" align="center" prop="name" width="120px"/>
      <el-table-column label="星期几" align="center" prop="fixDay">
        <template #default="scope">
          <dict-tag :options="rest_time" :value="scope.row.fixDay" />
        </template>
      </el-table-column>
      <el-table-column label="班次" align="center" prop="shift">
        <template #default="scope">
          <dict-tag :options="execution_shift_1" :value="scope.row.shift" />
        </template>
      </el-table-column>
      <el-table-column label="计划开始时间" align="center" prop="planBeginTime" width="120px">
        <template #default="scope">
          <span>{{ parseTime(scope.row.planBeginTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="计划结束时间" align="center" prop="planEndTime" width="120px">
        <template #default="scope">
          <span>{{ parseTime(scope.row.planEndTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="网点数量" align="center" prop="name" />
      <el-table-column label="业务员强制授权" align="center" prop="isAuthOper" width="150px">
        <template #default="scope">
          <dict-tag :options="sys_yes_no" :value="scope.row.isAuthOper" />
        </template>
      </el-table-column>
      <el-table-column label="司机强制授权" align="center" prop="isAuthDriver" width="130px">
        <template #default="scope">
          <dict-tag :options="sys_yes_no" :value="scope.row.isAuthDriver" />
        </template>
      </el-table-column>
      <el-table-column label="车辆强制授权" align="center" prop="isAuthVehicle" width="130px">
        <template #default="scope">
          <dict-tag :options="sys_yes_no" :value="scope.row.isAuthVehicle" />
        </template>
      </el-table-column>
      <el-table-column label="业务员绩效档位" align="center" prop="zswsOperTier" width="120px">
        <template #default="scope">
          <dict-tag :options="performance_level" :value="scope.row.zswsOperTier" />
        </template>
      </el-table-column>
      <el-table-column label="司机绩效档位" align="center" prop="zswsDriverTier" width="120px">
        <template #default="scope">
          <dict-tag :options="performance_level" :value="scope.row.zswsDriverTier" />
        </template>
      </el-table-column>
      <el-table-column label="司机兼职业务" align="center" prop="zswsPartTimeDriver" width="130px">
        <template #default="scope">
          <dict-tag :options="sys_yes_no" :value="scope.row.zswsPartTimeDriver" />
        </template>
      </el-table-column>
      <el-table-column label="途径佛山" align="center" prop="isThroughFoshan" width="120px">
        <template #default="scope">
          <dict-tag :options="sys_yes_no" :value="scope.row.isThroughFoshan" />
        </template>
      </el-table-column>
      <el-table-column label="押运员领枪时长(分钟)" align="center" prop="getGunMinute" width="150px"/>
      <el-table-column label="司机领钥匙时长(分钟)" align="center" prop="getKeyMinute" width="150px"/>
      <el-table-column label="业务员领任务单时长(分钟)" align="center" prop="getListMinute" width="180px"/>
      <el-table-column label="修改人" align="center" prop="UpdateBy" width="130px"/>
      <el-table-column label="修改时间" align="center" prop="UpdateTime" width="180px">
        <template #default="scope">
          <span>{{ parseTime(scope.row.UpdateTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="授权修改人" align="center" prop="authUpdateBy" width="130px"/>
      <el-table-column label="授权修改时间" align="center" prop="authUpdateTime" width="180px">
        <template #default="scope">
          <span>{{ parseTime(scope.row.authUpdateTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="备注" align="center" prop="routeRemark" />
    </el-table>

    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
      @pagination="getList" />

    <!-- 添加或修改固定线路对话框 -->
    <el-dialog :title="title" v-model="open" width="900px" append-to-body>
      <el-form ref="fixZswsRouteRef" :model="form" :rules="rules" label-width="140px">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="线路编号" prop="routeNo">
              <el-input v-model="form.routeNo" placeholder="请输入线路编号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="线路名称" prop="name">
              <el-input v-model="form.name" placeholder="请输入线路名称" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="星期几" prop="fixDay">
              <el-select v-model="form.fixDay" placeholder="请选择星期几">
                <el-option v-for="dict in rest_time" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="计划开始时间" prop="planBeginTime">
              <el-date-picker clearable v-model="form.planBeginTime" type="date" value-format="YYYY-MM-DD"
                placeholder="请选择计划开始时间">
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="计划结束时间" prop="planEndTime">
              <el-date-picker clearable v-model="form.planEndTime" type="date" value-format="YYYY-MM-DD"
                placeholder="请选择计划结束时间">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="班次" prop="shift">
              <el-select v-model="form.shift" placeholder="请选择班次">
                <el-option v-for="dict in execution_shift_1" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="业务员绩效档位" prop="zswsOperTier">
              <el-select v-model="form.zswsOperTier" placeholder="请选择业务员绩效档位">
                <el-option v-for="dict in performance_level" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="司机绩效档位" prop="zswsDriverTier">
              <el-select v-model="form.zswsDriverTier" placeholder="请选择司机绩效档位">
                <el-option v-for="dict in performance_level" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="司机是否兼职业务" prop="zswsPartTimeDriver">
              <el-select v-model="form.zswsPartTimeDriver" placeholder="请选择司机是否兼职业务">
                <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label"
                  :value="parseInt(dict.value)"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="押运员领枪时长" prop="getGunMinute">
              <el-input v-model="form.getGunMinute" placeholder="请输入押运员领枪时长" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="司机领钥匙时长" prop="getKeyMinute">
              <el-input v-model="form.getKeyMinute" placeholder="请输入司机领钥匙时长" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="领任务单时长" prop="getListMinute">
              <el-input v-model="form.getListMinute" placeholder="请输入领任务单时长" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="是否途径佛山" prop="isThroughFoshan">
              <el-select v-model="form.isThroughFoshan" placeholder="请选择是否途径佛山">
                <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否单次收费线路" prop="isOneWayRoute">
              <el-select v-model="form.isOneWayRoute" placeholder="请选择是否单次收费线路">
                <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="是否去人行" prop="isToPboc">
              <el-select v-model="form.isToPboc" placeholder="请选择是否去人行">
                <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否去机场" prop="isToAirport">
              <el-select v-model="form.isToAirport" placeholder="请选择是否去机场">
                <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="是否去农商广州库房" prop="isToGzrbc">
              <el-select v-model="form.isToGzrbc" placeholder="请选择是否去农商广州库房">
                <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否需要枪柜钥匙" prop="isNeedKeyOfGunBox">
              <el-select v-model="form.isNeedKeyOfGunBox" placeholder="请选择是否需要枪柜钥匙">
                <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="是否需要单页打印" prop="isPrintOneSide">
              <el-select v-model="form.isPrintOneSide" placeholder="请选择是否需要单页打印">
                <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="业务员是否强制授权" prop="isAuthOper">
              <el-select v-model="form.isAuthOper" placeholder="请选择业务员是否强制授权">
                <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="司机是否强制授权" prop="isAuthDriver">
              <el-select v-model="form.isAuthDriver" placeholder="请选择司机是否强制授权">
                <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="车辆是否强制授权" prop="isAuthVehicle">
              <el-select v-model="form.isAuthVehicle" placeholder="请选择车辆是否强制授权">
                <el-option v-for="dict in sys_yes_no" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="授权修改人" prop="authUpdateBy">
              <el-input v-model="form.authUpdateBy" placeholder="请输入授权修改人" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="授权修改时间" prop="authUpdateTime">
              <el-date-picker clearable v-model="form.authUpdateTime" type="date" value-format="YYYY-MM-DD"
                placeholder="请选择授权修改时间">
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="固定线路任务列表" prop="fixTaskIdList">
              <el-input v-model="form.fixTaskIdList" placeholder="请输入固定线路任务列表" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="固定线路状态" prop="status">
              <el-input v-model="form.status" placeholder="请输入固定线路状态" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <el-row :gutter="20">
        <el-col :span="24">
          <el-form-item label="备注" prop="routeRemark">
            <el-input v-model="form.routeRemark" type="textarea" placeholder="请输入内容" />
          </el-form-item>
        </el-col>
      </el-row>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="submitForm">确 定</el-button>
          <el-button @click="cancel">取 消</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>

<script setup name="FixZswsRoute">
import { listFixZswsRoute, getFixZswsRoute, delFixZswsRoute, addFixZswsRoute, updateFixZswsRoute } from "@/api/service/fixZswsRoute"

const { proxy } = getCurrentInstance()
const { rest_time, performance_level, sys_yes_no, execution_shift_1 } = proxy.useDict('rest_time', 'performance_level', 'sys_yes_no', 'execution_shift_1')

const fixZswsRouteList = ref([])
const open = ref(false)
const loading = ref(true)
const showSearch = ref(true)
const ids = ref([])
const single = ref(true)
const multiple = ref(true)
const total = ref(0)
const title = ref("")

const data = reactive({
  form: {},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    routeNo: null,
    name: null,
    fixDay: null,
    shift: null,
    isAuthOper: null,
    isAuthDriver: null,
    isAuthVehicle: null,
    status: null,
  },
  rules: {
    routeNo: [
      { required: true, message: "线路编号不能为空", trigger: "blur" }
    ],
    name: [
      { required: true, message: "线路名称不能为空", trigger: "blur" }
    ],
    shift: [
      { required: true, message: "班次不能为空", trigger: "change" }
    ],
    zswsOperTier: [
      { required: true, message: "业务员绩效档位不能为空", trigger: "change" }
    ],
    zswsDriverTier: [
      { required: true, message: "司机绩效档位不能为空", trigger: "change" }
    ],
    zswsPartTimeDriver: [
      { required: true, message: "司机是否兼职业务不能为空", trigger: "change" }
    ],
    isAuthOper: [
      { required: true, message: "业务员是否强制授权不能为空", trigger: "change" }
    ],
    isAuthDriver: [
      { required: true, message: "司机是否强制授权不能为空", trigger: "change" }
    ],
    isAuthVehicle: [
      { required: true, message: "车辆是否强制授权不能为空", trigger: "change" }
    ],
    fixTaskIdList: [
      { required: true, message: "固定线路任务列表，关联zone_fix_task表，用逗号分隔不能为空", trigger: "blur" }
    ],
  }
})

const { queryParams, form, rules } = toRefs(data)

/** 查询固定线路列表 */
function getList() {
  loading.value = true
  listFixZswsRoute(queryParams.value).then(response => {
    fixZswsRouteList.value = response.rows
    total.value = response.total
    loading.value = false
  })
}

// 取消按钮
function cancel() {
  open.value = false
  reset()
}

// 表单重置
function reset() {
  form.value = {
    id: null,
    routeNo: null,
    name: null,
    fixDay: null,
    planBeginTime: null,
    planEndTime: null,
    shift: null,
    zswsOperTier: null,
    zswsDriverTier: null,
    zswsPartTimeDriver: null,
    getGunMinute: null,
    getKeyMinute: null,
    getListMinute: null,
    isThroughFoshan: null,
    isOneWayRoute: null,
    isToPboc: null,
    isToAirport: null,
    isToGzrbc: null,
    isNeedKeyOfGunBox: null,
    isPrintOneSide: null,
    isAuthOper: null,
    isAuthDriver: null,
    isAuthVehicle: null,
    authUpdateBy: null,
    authUpdateTime: null,
    routeRemark: null,
    fixTaskIdList: null,
    status: null,
    createTime: null,
    createBy: null,
    deliverTime: null,
    updateBy: null,
    updateTime: null
  }
  proxy.resetForm("fixZswsRouteRef")
}

/** 搜索按钮操作 */
function handleQuery() {
  queryParams.value.pageNum = 1
  getList()
}

/** 重置按钮操作 */
function resetQuery() {
  proxy.resetForm("queryRef")
  handleQuery()
}

// 多选框选中数据
function handleSelectionChange(selection) {
  ids.value = selection.map(item => item.id)
  single.value = selection.length != 1
  multiple.value = !selection.length
}

/** 新增按钮操作 */
function handleAdd() {
  reset()
  open.value = true
  title.value = "添加固定线路"
}

/** 修改按钮操作 */
function handleUpdate(row) {
  reset()
  const _id = row.id || ids.value
  getFixZswsRoute(_id).then(response => {
    form.value = response.data
    open.value = true
    title.value = "修改固定线路"
  })
}

/** 提交按钮 */
function submitForm() {
  proxy.$refs["fixZswsRouteRef"].validate(valid => {
    if (valid) {
      if (form.value.id != null) {
        updateFixZswsRoute(form.value).then(response => {
          proxy.$modal.msgSuccess("修改成功")
          open.value = false
          getList()
        })
      } else {
        addFixZswsRoute(form.value).then(response => {
          proxy.$modal.msgSuccess("新增成功")
          open.value = false
          getList()
        })
      }
    }
  })
}

/** 删除按钮操作 */
function handleDelete(row) {
  const _ids = row.id || ids.value
  proxy.$modal.confirm('是否确认删除固定线路编号为"' + _ids + '"的数据项？').then(function () {
    return delFixZswsRoute(_ids)
  }).then(() => {
    getList()
    proxy.$modal.msgSuccess("删除成功")
  }).catch(() => { })
}

/** 导出按钮操作 */
function handleExport() {
  proxy.download('service/fixZswsRoute/export', {
    ...queryParams.value
  }, `fixZswsRoute_${new Date().getTime()}.xlsx`)
}

getList()
</script>

<!-- 全局设置el-input宽度 -->
<style scoped>
:deep(.el-input),
:deep(.el-select .el-input) {
  width: 215px;
  box-sizing: border-box;
}
</style>